package com.sun.dream.fish.config;

import jakarta.servlet.http.HttpSessionEvent;
import jakarta.servlet.http.HttpSessionListener;
import org.springframework.stereotype.Service;

/**
 * Description:
 * Created By ljl on 2023/12/18.
 */
@Service
public class MySessionListener implements HttpSessionListener {
    @Override
    public void sessionCreated(HttpSessionEvent se) {
        String sessionId = se.getSession().getId();
        System.out.println("记录session日志： JSESSIONID: " + sessionId);
    }

    @Override
    public void sessionDestroyed(HttpSessionEvent se) {
        // do nothing
    }
}